package wwy.Entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.ManyToOne;
import lombok.Getter;
import lombok.Setter;
import wwy.Common.orgEntity.LogicEntity;
import wwy.Entity.CommonEntity.Foods;

@Getter
@Setter
@Entity
public class OrderItem extends LogicEntity {
    private Integer quantity;
    private Double price;

    @ManyToOne(fetch = FetchType.LAZY)
    @JsonIgnoreProperties(value = {"orderItems"})
    private Orders order;

    @ManyToOne(fetch = FetchType.LAZY)
    @JsonIgnoreProperties(value = {"orderItems"})
    private Foods food;
}
